<html>
<head><meta charset="utf-8"><title>asan false positives · wg-secure-code · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/index.html">wg-secure-code</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/asan.20false.20positives.html">asan false positives</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="177674201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/asan%20false%20positives/near/177674201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stuart Small <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/asan.20false.20positives.html#177674201">(Oct 09 2019 at 01:19)</a>:</h4>
<p>I know rust can trigger some false positives with address sanitizer.  In fuzzing a crate I got some real findings but also got ThreadSanitizer to trigger on some inputs.  Does anyone have experience with if I can trust it with rust?  I haven't had it trigger before</p>



<a name="177697961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/asan%20false%20positives/near/177697961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> stko <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/asan.20false.20positives.html#177697961">(Oct 09 2019 at 09:47)</a>:</h4>
<p>With thread sanitizer false positives are highly likely if you have uninstrumented code that uses atomics, custom asm for synchronization, or atomic fences. Otherwise you should be fine.</p>



<a name="177709700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/asan%20false%20positives/near/177709700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Stuart Small <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/asan.20false.20positives.html#177709700">(Oct 09 2019 at 12:47)</a>:</h4>
<p>Awesome, thanks!</p>



<a name="177765102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/asan%20false%20positives/near/177765102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/asan.20false.20positives.html#177765102">(Oct 09 2019 at 23:25)</a>:</h4>
<p>ASAN sometimes triggers false positives on this C++ oriented check, which is quite easy to disable: <a href="https://github.com/google/sanitizers/wiki/AddressSanitizerOneDefinitionRuleViolation" target="_blank" title="https://github.com/google/sanitizers/wiki/AddressSanitizerOneDefinitionRuleViolation">https://github.com/google/sanitizers/wiki/AddressSanitizerOneDefinitionRuleViolation</a></p>



<a name="177765327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146229-wg-secure-code/topic/asan%20false%20positives/near/177765327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Shnatsel <a href="https://rust-lang.github.io/zulip_archive/stream/146229-wg-secure-code/topic/asan.20false.20positives.html#177765327">(Oct 09 2019 at 23:28)</a>:</h4>
<p>Here's the workaround in action: <a href="https://github.com/image-rs/image-png/blob/edcf8b07a355159fe69248aeb757cc48f212cf41/png-afl/src/main.rs#L6" target="_blank" title="https://github.com/image-rs/image-png/blob/edcf8b07a355159fe69248aeb757cc48f212cf41/png-afl/src/main.rs#L6">https://github.com/image-rs/image-png/blob/edcf8b07a355159fe69248aeb757cc48f212cf41/png-afl/src/main.rs#L6</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>